const app = getApp()

Page({
  data: {
    balance: 0,
    freeze: 0,
    score: 0,
    score_sign_continuous: 0
  },
  onLoad() {

  },
  onShow() {
    this.getUserInfo();
    this.setData({
      version: app.globalData.version
    });
   
  
  },
  getUserInfo: function (cb) {
    var that = this
    wx.login({
      success: function () {
        wx.getUserInfo({
          success: function (res) {
            that.setData({
              userInfo: res.userInfo
            });
          }
        })
      }
    })
  },
  aboutUs: function () {
    wx.showModal({
      title: '关于我们',
      content: '本系统由童伙信息技术开发',
      showCancel: false
    })
  },
  authMe: function () {
    wx.showModal({
      title: '系统提示',
      content: '未实名认证，是否实名认证',
      showCancel: false
    })
  },

 

  // relogin: function () {
  //   var that = this;
  //   wx.authorize({
  //     scope: 'scope.userInfo',
  //     success() {
  //       app.globalData.token = null;
  //       app.login();
  //       wx.showModal({
  //         title: '提示',
  //         content: '重新登陆成功',
  //         showCancel: false,
  //         success: function (res) {
  //           if (res.confirm) {
  //             that.onShow();
  //           }
  //         }
  //       })
  //     },
  //     fail(res) {
  //       console.log(res);
  //       wx.openSetting({});
  //     }
  //   })
  // },
  recharge: function () {
    wx.navigateTo({
      url: "/pages/recharge/index"
    })
  },
  withdraw: function () {
    wx.navigateTo({
      url: "/pages/withdraw/index"
    })
  }
})